#pragma once
#include<wrl/client.h>
#include<wrl/implements.h>
#include<audioclient.h>
#include<mmdeviceapi.h>
#include<mfapi.h>
#include<ppltasks.h>

using namespace Microsoft::WRL;
using namespace concurrency;

namespace GuitarFX_Audio
{
	class CAudioInterfaceActivator : public RuntimeClass< RuntimeClassFlags< ClassicCom >, FtmBase, IActivateAudioInterfaceCompletionHandler >
	{
		task_completion_event<ComPtr<IAudioClient2>> m_ActivateCompleted;
		STDMETHODIMP ActivateCompleted(IActivateAudioInterfaceAsyncOperation  *pAsyncOp);
	public:
		static task<ComPtr<IAudioClient2>> CAudioInterfaceActivator::ActivateAsync(LPCWCHAR deviceId);
	};

};